{% extends "common/frame.html" %}
{% load string %}
{% load i18n %} 

{% block head %}
  <title>
  {% if post %}
    {{ post.title|escape }}
  {% else %}
    {% if tag %}{{ tag|escape }} - {% endif %}{{ config.site_title }}
  {% endif %}
  </title>
  <link href="{% url ytcommunity.blog.view.blog.feed %}{% if tag %}?tag={{tag|encode|urlencode}}{% endif %}" rel="alternate" type="application/rss+xml">
  {% block description %}
  {% endblock %}  
{% endblock %}

{% block header %}
<div id="header">
  <div id="logo">
    <h1><a href="/">{{ config.site_title }}<sup></sup></a></h1>
    <h2>{{ config.site_description }}</h2>
  </div>  
  
  <div id="menu">
    <ul>
    <li class="active"><a href="{% url ytcommunity.blog.view.blog.list %}">{% trans "Homepage" %}</a></li>
      
    {% if ytblog_use_promotion %}
    <li><a href="{% url ytcommunity.blog.view.blog.all %}">{% trans "All Blogs" %}</a></li>
    {% endif %}
      
      
	{% if auth.add %}
	<li><a href="{% url ytcommunity.blog.view.blog.add %}">{% trans "Add Blog" %}</a></li>
	<li><a href="{% url ytcommunity.blog.view.blog.my %}">{% trans "My Blogs" %}</a></li>
	{% endif %}      
    
    <li>  
        {% if user.user %}
        <a href="{{ user.url }}">{% trans "Logout" %}</a>  
		{% else %}
		<a href="{{ user.url }}">{% trans "Login" %}</a>
		{% endif %}
   	</li>
    </ul>
  </div>
  
</div>
{% endblock %}

{% block page %}
<div id="page">
<div id="content_blog">
  {% block content %}
  {% endblock %}
  <script type="text/javascript">
    dp.SyntaxHighlighter.ClipboardSwf = '/static/js/syntaxhighlighter/clipboard.swf';
    dp.SyntaxHighlighter.HighlightAll('code');
  </script> 
</div>
{% include "blog/side.html" %}
</div>
{% endblock %}
